package cn.csc.module.pay.controller.admin.refund.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigInteger;
import java.time.LocalDateTime;

import static cn.csc.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@ApiModel("管理后台 - 退款订单 Excel 导出 Request VO，参数和 PayRefundPageReqVO 是一致的")
@Data
public class PayRefundExportReqVO {

    @ApiModelProperty(value = "商户编号", example = "21412")
    private BigInteger merchantId;

    @ApiModelProperty(value = "应用编号", example = "1024")
    private BigInteger appId;

    @ApiModelProperty(value = "渠道编号", example = "1024")
    private BigInteger channelId;

    @ApiModelProperty(value = "渠道编码", example = "cscd")
    private String channelCode;

    @ApiModelProperty(value = "支付订单编号 pay_order 表id", example = "1024")
    private BigInteger orderId;

    @ApiModelProperty(value = "交易订单号 pay_extension 表no 字段", example = "cscd")
    private String tradeNo;

    @ApiModelProperty(value = "商户订单编号（商户系统生成）", example = "cscd")
    private String merchantOrderId;

    @ApiModelProperty(value = "商户退款订单号（商户系统生成）", example = "cscd")
    private String merchantRefundNo;

    @ApiModelProperty(value = "异步通知商户地址", example = "https://ip/port/url")
    private String notifyUrl;

    @ApiModelProperty(value = "通知商户退款结果的回调状态", example = "1")
    private Integer notifyStatus;

    @ApiModelProperty(value = "退款状态", example = "1")
    private Integer status;

    @ApiModelProperty(value = "退款类型(部分退款，全部退款)", example = "1")
    private Integer type;

    @ApiModelProperty(value = "支付金额,单位分", example = "1212")
    private Long payAmount;

    @ApiModelProperty(value = "退款金额,单位分", example = "1212")
    private Long refundAmount;

    @ApiModelProperty(value = "退款原因", example = "原因")
    private String reason;

    @ApiModelProperty(value = "用户 IP", example = "127.0.0.1")
    private String userIp;

    @ApiModelProperty(value = "渠道订单号，pay_order 中的channel_order_no 对应", example = "sdawq")
    private String channelOrderNo;

    @ApiModelProperty(value = "渠道退款单号，渠道返回", example = "sdawq")
    private String channelRefundNo;

    @ApiModelProperty(value = "渠道调用报错时，错误码", example = "sdawq")
    private String channelErrorCode;

    @ApiModelProperty(value = "渠道调用报错时，错误信息", example = "错误原因")
    private String channelErrorMsg;

    @ApiModelProperty(value = "支付渠道的额外参数", example = "额外参数")
    private String channelExtras;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "退款失效时间", example = "[yyyy-MM-dd HH:mm:ss]")
    private LocalDateTime[] expireTime;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "退款成功时间", example = "[yyyy-MM-dd HH:mm:ss]")
    private LocalDateTime[] successTime;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "退款通知时间", example = "[yyyy-MM-dd HH:mm:ss]")
    private LocalDateTime[] notifyTime;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "创建时间", example = "[yyyy-MM-dd HH:mm:ss]")
    private LocalDateTime[] createTime;

}
